# -*- coding:utf-8 -*-
# Created on 2017.3.14
# @author: hejia
# @Desc:

import xpy

class KBEEvent(object):
    sharpRegisterOut = None  # sharp function

    @staticmethod
    def registerOut(eventname, func):
        if KBEEvent.sharpRegisterOut is None:
            return
        # print(eventname, func)
        ret = xpy.csharpcall(KBEEvent.sharpRegisterOut, eventname, func)
        # print("Return:" , ret)


def setSharpRegisterOut(callback):
    KBEEvent.sharpRegisterOut = callback

